package com.bill.app.serveur.bean;

import java.io.Serializable;
 
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

 
/**
 * This is the object class that relates to the amis table.
 * Any customizations belong here.
 */
@Table
@Entity
public class Amis implements Serializable {
/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
/**
 * java.lang.Long _id,
		java.lang.String _nomContact,
		java.lang.String _login,
		java.lang.String _prenomContact,
		java.lang.String _loginContact
 */
	@Id
	@GeneratedValue
	private long id;
	 
	@ManyToOne(targetEntity=Abonnes.class)
	@JoinColumn(name="refabonne",referencedColumnName="login",nullable=true)
	private Abonnes abonne;
	@ManyToOne(targetEntity=Abonnes.class)
	@JoinColumn(name="refamis",referencedColumnName="login",nullable=true)
	private Abonnes amis;
	public Amis(Abonnes abonne, Abonnes amis) {
		super();
		this.abonne = abonne;
		this.amis = amis;
	}
	public Amis() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Amis(long id,  
			Abonnes abonne, Abonnes amis) {
		super();
		this.id = id;
		 
		this.abonne = abonne;
		this.amis = amis;
	}
	/**
	 * @return the id
	 */
	public long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(long id) {
		this.id = id;
	}
	 
	 
	/**
	 * @return the abonne
	 */
	public Abonnes getAbonne() {
		return abonne;
	}
	/**
	 * @param abonne the abonne to set
	 */
	public void setAbonne(Abonnes abonne) {
		this.abonne = abonne;
	}
	/**
	 * @return the amis
	 */
	public Abonnes getAmis() {
		return amis;
	}
	/**
	 * @param amis the amis to set
	 */
	public void setAmis(Abonnes amis) {
		this.amis = amis;
	}
 
}